package com.lei.retrofitlibrary.http.factory;

import com.lei.retrofitlibrary.http.product.NetWorkProduct;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/11 15:55
 * @Description : 文件描述
 */
public class RetrofitFactory implements IRetrofitFactory {
    private static RetrofitFactory instance = new RetrofitFactory();
    private NetWorkProduct netWorkManger = new NetWorkProduct();
    public static <T> T create(Class<T> service){
        return instance.createRetrofit().getRetrofit().create(service);
    }
    @Override
    public NetWorkProduct createRetrofit() {
        return netWorkManger;
    }
}
